<html>
<meta charset="utf-8">

<head>
    <script src="jquery-3.2.1.min.js"></script>
    <style>
    div.img{
        float: left;
        width: 180px;
        border: 1px solid #ccc;
    }

    div.img img{
        width: 100%;
        height: 100px;
        opacity: 0.3;
        filter: alpha(opacity=50)
    }
    div.img img:hover{
        opacity: 1;
        filter: alpha(opacity=100)
    }
    </style>
</head>
<div>
    <h3>透明度使用opacity 范围从0~1 IE8和更早版本要使用 alpha(opacity=20) 范围0~100 来调整透明度</h3>
     <div class="img">
         <img src="img/pinkblue.jpg">
     </div>
</div>

</html>